
package javango.spi;

import com.google.inject.Injector;
import com.google.inject.Module;
import javango.api.Settings;

/**
 * Interface allowing javango-core to communicate with other javango submodules
 * and vice versa. Framework user can customize list of used Javango submodules 
 * via {@link Settings#setJavangoModules} (TBD - for now hardcoded hibernate and forms).
 * This interface allow submodules to provide their guice configration module.
 * Javango core calls {@link #getModule()} method first, then creates Guice injector
 * and pass it back to all submodules.
 */
public interface JavangoModule {

    /**
     * 
     * @return can return null
     */
    Module getModule();
    
    void init(Injector injector);
    
}
